package logic

import (
	"context"
	"onerk4/zg5yk/ordering/common/proto/takeout"
	"onerk4/zg5yk/ordering/service/server"
)

type TakeoutServer struct {
	takeout.UnimplementedTakeoutServer
}

func (t TakeoutServer) ShowTakeoutList(ctx context.Context, req *takeout.ShowTakeoutListRequest) (*takeout.ShowTakeoutListResponse, error) {
	list, err := server.ShowTakeoutList(req)
	if err != nil {
		return nil, err
	}
	return list, nil
}

func (t TakeoutServer) UserRecommend(ctx context.Context, req *takeout.UserRecommendRequest) (*takeout.UserRecommendResponse, error) {
	list, err := server.UserRecommend(req)
	if err != nil {
		return nil, err
	}
	return list, nil
}
